package me.ilvc.kotlinfandroid.domain.commands

import me.ilvc.kotlinfandroid.data.ForecastRequest
import me.ilvc.kotlinfandroid.domain.mappers.ForecastDataMapper
import me.ilvc.kotlinfandroid.domain.model.ForecastList

/**
 * @Author: iLvc
 * @Date：Create in 15:43 2017/9/26
 * @Description:
 */

class RequestForcastCommand(val zipCode: String): Command<ForecastList>{
    override fun execute(): ForecastList {
        val forecastRequest = ForecastRequest(zipCode)
        return ForecastDataMapper().convertFromDataModel(forecastRequest.execute())
    }
}